import 'package:flutter/material.dart';

class Wode extends StatefulWidget {
  Wode({Key? key}) : super(key: key);

  _WodeState createState() => _WodeState();
}

class _WodeState extends State<Wode> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Row(
          children: <Widget>[
            Expanded(
              child: UserAccountsDrawerHeader(
              accountName: Text("涛哥空间"),
              accountEmail: Text("taoge@itying.com"),
              currentAccountPicture: CircleAvatar(
                backgroundImage:
                    NetworkImage("https://www.itying.com/images/flutter/3.png"),
              ),
              decoration: BoxDecoration(
                  image: DecorationImage(
                image:
                    NetworkImage("https://www.itying.com/images/flutter/2.png"),
                fit: BoxFit.cover,
              )),
              otherAccountsPictures: <Widget>[
                Image.network("https://www.itying.com/images/flutter/4.png"),
                Image.network("https://www.itying.com/images/flutter/5.png"),
              ],
            ))
          ],
        ),
        ListTile(
          leading: CircleAvatar(child: Icon(Icons.home)),
          title: Text("我的空间"),
        ),
        Divider(),
        ListTile(
          leading: CircleAvatar(child: Icon(Icons.people)),
          title: Text("用户中心"),
          onTap: () {
            Navigator.of(context).pop(); //隐藏侧边栏
            Navigator.pushNamed(context, '/user');
          },
        ),
        Divider(),
        ListTile(
          leading: CircleAvatar(child: Icon(Icons.settings)),
          title: Text("设置中心"),
        ),
        Divider(),
      ],
    );
  }
}
